type EventNames = "click" | "scroll" | "mousemove";
function handleEvent(ele: Element, event: EventNames) {
  // do something
}

let hello = document.getElementById("hello");
if (hello) {
  handleEvent(hello, "click");
  // handleEvent(hello, "dbclick");
}
